Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / About View Device Objects


View Device Objects and Physical Devices

View device objects are different from some other QuickDraw GX objects in that QuickDraw GX creates all that you need for ordinary drawing. Unless you are drawing offscreen or want unusual onscreen effects, you do not have to create a view device.

At startup, QuickDraw GX creates a view device object for each physical display device attached to the system, assigning the device to the onscreen view group (see "Onscreen and Offscreen View Groups" on page 7-29). QuickDraw GX sets the view device mapping and clip properties to reflect the device's pixel size, dimensions, and position in relation to other view devices. QuickDraw GX initializes the view device bitmap, assigning it a pixel image of appropriate size and pixel depth, and a color set and color profile based on information provided by the device's driver. (If the user changes the relative positions of display devices by some means such as the Monitors control panel, QuickDraw GX automatically updates the mappings and clips of the view devices to reflect the change.)

If you need information about any display device, you can first obtain a list of all the view device objects in the onscreen view group. You can then use the object references in that list to examine the properties of each device as needed.

View device objects are also associated with printers. To access the view device of a printer--if, for example, you want to mimic its characteristics with an offscreen view device--you use functions described in the advanced printing features chapter of Inside Macintosh: QuickDraw GX Printing.

For offscreen drawing, you do need to create your own view device objects and initialize all of their properties, including their bitmaps. Note that if you create a bitmap for offscreen drawing whose characteristics exactly match those of an onscreen view device, you can quickly transfer the results of your offscreen drawing to the screen by simply drawing that bitmap onscreen.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996